package com.fire.control.system.support.protocol.comman;

import org.springframework.stereotype.Component;

import com.fire.control.system.selector.Selector;

/***
 * 
 * @ClassName:  ProtocolSelector   
 * @Description:协议选择器
 * @author:   chenchuang
 *
 */
@Component("protocolSelector")
public class ProtocolSelector implements Selector<RequestProtocol,ResponseProtocol>{
	
	private ProtocolConverter converter = new ProtocolConverter();
	/***
	 * 
	 * <p>Title: choose</p>   
	 * <p>Description: 选择相应的响应协议</p>   
	 * @param requestProtocol
	 * @return   
	 */
	@Override
	public ResponseProtocol choose(RequestProtocol requestProtocol) {
		return converter.convert(requestProtocol);
	}
}
